package com.shop.zkmall.app.controller.a;

import com.shop.zkmall.app.domain.req.LiveRoomGoodsReq;
import com.shop.zkmall.app.service.a.ILiveRoomGoodsService;
import com.shop.zkmall.commons.result.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("liveCart")
@RequiredArgsConstructor
@Tag(name = "直播小黄车模块", description = "直播小黄车模块")
public class LiveCartController {


    private final ILiveRoomGoodsService iLiveRoomGoodsService;


    /**
     * 添加直播商品
     */
    @PostMapping("/addLiveProduct")
    @Operation(summary = "添加直播商品")
    public R<?> addLiveProduct(@RequestBody LiveRoomGoodsReq liveRoomGoodsReq) {
        return iLiveRoomGoodsService.addLiveProduct(liveRoomGoodsReq);
    }

    /**
     * 删除直播商品
     */
    @PostMapping("/delLiveProduct")
    @Operation(summary = "删除直播商品")
    public R<?> delLiveProduct(@RequestBody LiveRoomGoodsReq liveRoomGoodsReq) {
        return iLiveRoomGoodsService.delLiveProduct(liveRoomGoodsReq);
    }

}
